import moment from 'moment'

// 账单认领
export const PageListThead = [
  {
    title: '客户名称',
    key: 'companyName',
    minWidth: 150
  },
  {
    title: '费用月份',
    key: 'month',
    minWidth: 120,
    render: (h, params) => {
      const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
      const text = params.row.year + '' + month
      return h('span', text)
    }
  },
  {
    title: '应收账单金额',
    key: 'billAmt',
    minWidth: 150
  },
  {
    title: '认领方式',
    key: 'type',
    minWidth: 150
  },
  {
    title: '到款所属项目',
    key: 'insuranceName',
    minWidth: 150
  },
  {
    title: '认领账单金额',
    key: 'amt',
    minWidth: 150
  },
  // {
  //   title: '已用授信金额',
  //   key: 'xx',
  //   minWidth: 150
  // },
  // {
  //   title: '认领授信金额',
  //   key: 'xx',
  //   minWidth: 150
  // },
  // {
  //   title: '垫付金额',
  //   key: 'xx',
  //   minWidth: 150
  // },
  // {
  //   title: '认领垫付金额',
  //   key: 'xx',
  //   minWidth: 150
  // },
  // {
  //   title: '认领说明',
  //   key: 'xx',
  //   minWidth: 150
  // },
  {
    title: '操作人',
    key: 'createName',
    minWidth: 150
  },
  {
    title: '操作时间',
    key: 'createTime',
    minWidth: 180,
    render: (h, params) => {
      const text = params.row.createTime ? moment(params.row.createTime).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  },
  {
    title: '状态',
    key: 'status',
    minWidth: 150,
    render: (h, params) => {
      const text = params.row.status == 0 ? '回退' : '正常'
      return h('span', text)
    }
  },
  {
    title: '操作',
    width: 180,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
]

// 待遇认领
export const PageListTheadTreatClaim = [
  {
    title: '客户名称',
    key: 'companyName',
    align: 'center',
    minWidth: 150
  },
  {
    title: '姓名',
    key: 'empName',
    align: 'center',
    minWidth: 150
  },
  {
    title: '身份证号码',
    minWidth: 190,
    align: 'center',
    key: 'idCardNo'
  },
  {
    title: '所属客服',
    minWidth: 120,
    align: 'center',
    key: 'serverName'
  },
  {
    title: '参保险种',
    minWidth: 120,
    align: 'center',
    key: 'insuranceName'
  },
  {
    title: '待遇名称',
    minWidth: 120,
    align: 'center',
    key: 'treatmentName'
  }, 
  {
    title: '参保编号',
    minWidth: 120,
    align: 'center',
    key: 'insuredNo'
  },
  {
    title: '认领金额',
    minWidth: 120,
    align: 'center',
    key: 'amt'
  },
  {
    title: '操作人',
    key: 'updateName',
    minWidth: 150
  },
  {
    title: '操作时间',
    key: 'updateTime',
    minWidth: 180,
    render: (h, params) => {
      const text = params.row.updateTime ? moment(params.row.updateTime).format('YYYY-MM-DD HH:mm') : ''
      return h('span', text)
    }
  },
  {
    title: '状态',
    key: 'status',
    minWidth: 150,
    render: (h, params) => {
      const text = params.row.status == 0 ? '回退' : '正常'
      return h('span', text)
    }
  },
  {
    title: '操作',
    width: 180,
    align: 'center',
    key: 'action',
    slot: 'action',
    fixed: 'right'
  }
]
